//
//  HuaBaoView.m
//  Style
//
//  Created by dllo on 15/9/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "HuaBaoView.h"
#import <Masonry.h>
#import "HuaBaoModel.h"
#define ScreenWidth          [[UIScreen mainScreen] bounds].size.width
#define ScreenHeight         [[UIScreen mainScreen] bounds].size.height

@implementation HuaBaoView

-(instancetype)initWithFrame:(CGRect)frame

{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.imageViewTop = [[UIImageView alloc ]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight /(ScreenHeight / 220))];
        [self addSubview:self.imageViewTop];
        
        
        self.labelTitle = [[UILabel alloc]init];
        [self.imageViewTop addSubview:self.labelTitle];
        self.labelTitle.textColor = [UIColor whiteColor];
        self.labelTitle.font = [UIFont boldSystemFontOfSize:23];
        
        self.labelTitle.shadowColor = [UIColor grayColor];
        self.labelTitle.shadowOffset = CGSizeMake(0.5,0);
        
        
        [self.labelTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.top.equalTo(self.imageViewTop).with.offset(130);
            make.left.equalTo(self.mas_left).with.offset(20);
            make.size.mas_equalTo(CGSizeMake(self.frame.size.width, 60));
            
        }];
        
      
        self.lableSummary = [[UILabel alloc]init];
        [self.imageViewTop addSubview:self.lableSummary];
        self.lableSummary.textColor = [UIColor whiteColor];
        self.lableSummary.font = [UIFont boldSystemFontOfSize:18];
        self.lableSummary.shadowColor = [UIColor grayColor];
        self.lableSummary.shadowOffset = CGSizeMake(0.5,0);
        
        
        
        [self.lableSummary mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.top.equalTo(self.labelTitle).with.offset(45);
            make.left.equalTo(self.mas_left).with.offset(20);
            make.size.mas_equalTo(CGSizeMake(self.frame.size.width, 40));
            
        }];
    }
 
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
